﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using CoreLibrary.Paging;
using CoreLibrary.Service;

namespace CoreLibrary.Repo {

    public interface IRepository<T> : IService {

        int Count();
        List<T> GetAll();
        List<T> GetMany(PagingRequest request); 

        void Remove(T t);
        void RemoveAll();

        List<T> SearchAll(List<Expression<Func<T, bool>>> expressions);
        List<T> SearchAny(List<Expression<Func<T, bool>>> expressions);

        void InsertAll(IEnumerable<T> entities);
    }

}